SL4 Instance Based Learning

less than 1 minute read

Published:

Instance Based Learning

1. KNN - K-nearest neighbor

1. Two Hyper-parameters:

  1. Distance function
  2. Number of K

domain knowledge needed to decide these two hyper-parameters

2. 1-NN vs KNN vs linear Regression:

TypeTime(learn)Time(query)Space(learn)Space(query)
1-NN1logNN1
K-NN1logN + kN1
Linear RegressionN11(two params m,b)1

3. Preference Bias of KNN:

  1. Locality —> assume near points are similar —> distance function
  2. Smoothness —> averages
  3. All feature matter equally —> same polynomial

2. Curse of Dimensionality

1.Definition

As number of features or dimensions grows, the amount of data needed to generalize accurately grows exponentially